package com.ruoyi.wlxz.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.wlxz.mapper.WxzSupplementRecordMapper;
import com.ruoyi.wlxz.domain.WxzSupplementRecord;
import com.ruoyi.wlxz.service.IWxzSupplementRecordService;

/**
 * 学分补录Service业务层处理
 * 
 * @author 张浩
 * @date 2025-07-21
 */
@Service
public class WxzSupplementRecordServiceImpl implements IWxzSupplementRecordService 
{
    @Autowired
    private WxzSupplementRecordMapper wxzSupplementRecordMapper;

    /**
     * 查询学分补录
     * 
     * @param supplementId 学分补录主键
     * @return 学分补录
     */
    @Override
    public WxzSupplementRecord selectWxzSupplementRecordBySupplementId(Long supplementId)
    {
        return wxzSupplementRecordMapper.selectWxzSupplementRecordBySupplementId(supplementId);
    }

    /**
     * 查询学分补录列表
     * 
     * @param wxzSupplementRecord 学分补录
     * @return 学分补录
     */
    @Override
    public List<WxzSupplementRecord> selectWxzSupplementRecordList(WxzSupplementRecord wxzSupplementRecord)
    {
        return wxzSupplementRecordMapper.selectWxzSupplementRecordList(wxzSupplementRecord);
    }

    /**
     * 新增学分补录
     * 
     * @param wxzSupplementRecord 学分补录
     * @return 结果
     */
    @Override
    public int insertWxzSupplementRecord(WxzSupplementRecord wxzSupplementRecord)
    {
        wxzSupplementRecord.setCreateTime(DateUtils.getNowDate());
        return wxzSupplementRecordMapper.insertWxzSupplementRecord(wxzSupplementRecord);
    }

    /**
     * 修改学分补录
     * 
     * @param wxzSupplementRecord 学分补录
     * @return 结果
     */
    @Override
    public int updateWxzSupplementRecord(WxzSupplementRecord wxzSupplementRecord)
    {
        return wxzSupplementRecordMapper.updateWxzSupplementRecord(wxzSupplementRecord);
    }

    /**
     * 批量删除学分补录
     * 
     * @param supplementIds 需要删除的学分补录主键
     * @return 结果
     */
    @Override
    public int deleteWxzSupplementRecordBySupplementIds(Long[] supplementIds)
    {
        return wxzSupplementRecordMapper.deleteWxzSupplementRecordBySupplementIds(supplementIds);
    }

    /**
     * 删除学分补录信息
     * 
     * @param supplementId 学分补录主键
     * @return 结果
     */
    @Override
    public int deleteWxzSupplementRecordBySupplementId(Long supplementId)
    {
        return wxzSupplementRecordMapper.deleteWxzSupplementRecordBySupplementId(supplementId);
    }
}
